#include "guiterm.hpp"
#ifndef FILELOCALVIEW_HPP
#define FILELOCALVIEW_HPP
#include <QProgressBar>

class FileLocalView
	:public JobViewSegment
{
	Q_OBJECT
public:
	FileLocalView(RemoteJob *owner, ServerConnection *host, const RPCParams *params);
	~FileLocalView();
	
protected slots:
	void updateProgress(string filename, double progress);
	void downloadFinished(string remoteFilename, string localFilename);
	void downloadFailed(string filename, string message);
	
private:
	void viewFile(string localName);
	
	string filename;
	string localName;
	FileReceiver *receiver;
	
	WidgetFrame *frame;
	QVBoxLayout *frameLayout;
	
	QHBoxLayout *downloadProgressLine;
	QLabel *downloadLabel;
	QProgressBar *downloadProgressBar;
};

#endif
